package com.alisls.demo.springcloud.service.user.dto.login;

import com.alisls.demo.springcloud.common.core.constant.ResultEnum;
import com.alisls.demo.springcloud.common.model.dto.DataResult;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

/**
 * 描述信息
 *
 * @author Ke Wang
 * @date 2020/11/12
 */
@Getter
@Setter
@ToString
public class AccountResult<E> extends DataResult<E> {

    private String status;

    /**
     * 构造函数
     * @param resultEnum
     * @param e
     * @param status
     */
    public AccountResult(ResultEnum resultEnum, E e, String status) {
        super(resultEnum, e);
        this.status = status;
    }

    /**
     * 返回成功数据的方法
     * @param o
     * @return DataResult
     */
    public static AccountResult ok(Object o) {
        return new AccountResult<>(ResultEnum.SUCCESS, o, "ok");
    }

}
